import extraConfigEvent from '@/common/extra-config-event.js';
import { EMIT_PARAMS_OBJ } from '@/utils/constant';
import { $demoi18n } from '@/utils/lang';
import { xvueTheme } from '@/utils/util';
export default {
  isCustomProertyPannel: true,
  propertyPannelName: `config_${process.env.xvueNameSpace_}single_header_page_table`,
  config: {
    property: {
      title: 'Table',
      isTitleSignVisiable: false,
      signMarginLeft: 10,
      verticalLineBackgroundColor: '#00ffff',
      hasHeader: true,
      hasColumnHeader: true,
      headerFilter: false,
      headerSort: false,
      tableCheckBox: false,
      isSummary: false,
      isPagination: true,
      isThousandSeparator: true,
      typeSetting: 'vertical',
      defaultPageSize: 15,
      componentStyle: xvueTheme,
      totalDecimal: 0,
      isThreshold: false,
      threshold: [],
      extension: [],
      emitEvent: {
        isEmitEvent: false,
        rowIndex: 1,
      },
      table: {},
      canAsTooltip: true, // 是否可插入到的别的组件的高级tooltip
      adaptSetting: {
        unitGapRate: 5,
        type: '0',
        tableData: [],
        lineGap: 30,
        rowAdjustHeight: 20,
        paddingLeft: 0,
        paddingRight: 0,
      },
      padding: {
        top: 0,
        left: 20,
        bottom: 10,
        right: 20,
      },
      uploadImgList: [],
      nullSet: '',
      noDataPromptType: 'defaultPrompt',
      noDataPrompt: '',
      columnSetList: [],
    },
    data: {
      dataSourceType: 'staticData',
      dataSource: '',
      apiCode: '',
      dataPackage: '',
      dataTable: '',
      redisKey: '',

      // xtag数据接口未通，为sit转测临时修改
      isExport: false,
      widthHidden: true,
      autoRefresh: {
        switchEnable: false,
        actTypes: ['pull'],
        actType: 'pull',
        interval: 300,
      },
      tableData: [
        {
          field: 'No',
          mapping: 'No',
          width: '',
          fieldType: 'number',
          advancedLinkage: {
            linkageDatas: [],
          },
          style: {},
          visible: true,
        },
      ],
    },
  },
  advancedLinkage: {},
  events: [
    {
      id: 'c85c5869-7162-4346-9b7a-1b7f04c8523r',
      key: 'row-click',
      label: '表格行点击事件',
      type: 'out',
      extraTpye: 'fieldName',
      description: '',
      parameters: [
        {
          id: '89d7f710-1230-45b1-bb87-7bcb8bec99e4',
          key: 'row_click_key',
          label: 'panelEvent.label.eventKey',
          value: '',
        },
        {
          id: 'dd788002-bpc2-4a32-a602-469080869e22',
          key: EMIT_PARAMS_OBJ,
          label: '发出参数对象',
          hide: true,
          value: '',
        },
      ],
    },
    {
      id: 'c85c5869-7162-4346-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-4882-b77b-782wsdfac7db',
          key: 'key-old-1',
          label: '区域',
          value: '',
        },
      ],
    },
    {
      id: 'c85c5869-7162-8566-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-2589-b77b-782wsdfac7db',
          key: 'key-old-2',
          label: '时间',
          value: '',
        },
      ],
    },
    {
      id: '41ac8490-d0b3-11ea-aa91-3d1e0ce473bf',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '8979dd90-d0b3-11ea-b0e9-8796c1dd4511',
          key: 'key-old-3',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '897c0070-d0b3-11ea-b0e9-8796c1dd4512',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '897c0071-d0b3-11ea-b0e9-8796c1dd4512',
          key: 'key-old-4',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '897c0070-d0b3-11ea-b0e9-8796c1dd4513',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '897c0071-d0b3-11ea-b0e9-8796c1dd4513',
          key: 'key-old-5',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '897c0070-d0b3-11ea-b0e9-8796c1dd4511',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '897c0071-d0b3-11ea-b0e9-8796c1dd4511',
          key: 'key-old-6',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000001-7162-bnmj-9b7a-1b7f04c85999',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-grvs-b77b-782tgbfac999',
          key: 'key-1',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000002-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '8f42b8f0-d315-11ea-988b-c71201010d36',
          key: 'key-2',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000003-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4cf9440-d315-11ea-bf46-2557ecf0db55',
          key: 'key-3',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000004-d315-11ea-bf46-2557ecf0db55',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4d141f1-d315-11ea-bf46-2557ecf0db55',
          key: 'key-4',
          label: '',
          value: '',
        },
      ],
    },
    ...extraConfigEvent,
  ],
};
